<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../assets/lib/layui/css/layui.css">
    <link rel="stylesheet" href="../assets/css/article/category.css">
</head>

<body>
    <div class="layui-card">
        <div class="layui-card-header">
            <span>文章类别</span>
            <button class="layui-btn layui-btn-normal layui-btn-sm" id="addcategory">添加类别</button>
        </div>
        <div class="layui-card-body">
            <table class="layui-table">
                <colgroup>
                    <col width="150">
                    <col width="150">
                    <col width='50'>
                </colgroup>
                <thead>
                    <tr>
                        <th>文章类别</th>
                        <th>别称</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    
                </tbody>
            </table>
        </div>
    </div>
    <script type="text/html" id="tpl-table">
        {{each data}}
        <tr>
          <td>{{$value.category}}</td>
          <td>{{$value.anothercategory}}</td>
          <td>
            <button type="button" id="edit" class="layui-btn layui-btn-xs">编辑</button>
            <button type="button" id="delete" class="layui-btn layui-btn-danger layui-btn-xs">删除</button>
          </td>
        </tr>
        {{/each}}
      </script>
    <script type="text/html" id="addcate-form">
        <form class="layui-form" action="">
            <div class="layui-form-item">
              <label class="layui-form-label">分类名称</label>
              <div class="layui-input-block">
                <input type="text" name="title" required  lay-verify="required" placeholder="请输入添加文章类别" autocomplete="off" class="layui-input" id="category1">
              </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">分类别名</label>
                <div class="layui-input-block">
                  <input type="text" name="title" required  lay-verify="required" placeholder="请输入添加文章别名" autocomplete="off" class="layui-input" id="category2">
                </div>
              </div>
              <button class="layui-btn" id="btn-addcate">添加</button>
              <button class="layui-btn layui-btn-danger" id="btn-reset">重置</button>
            </form>
    </script>
    <script src="../assets/lib/layui/layui.all.js"></script>
    <script src="../assets/lib/jquery.js"></script>
    <script src="../assets/js/baseApi.js"></script>
    <script src="../assets/lib/template-web.js"></script>
    <script src="../assets/js/article/category.js"></script>
</body>

</html>